<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<textarea class="textarea" placeholder="输入200字介绍" id="userSign"></textarea>
	<div class="div"></div>
	<script>
		var str="asd<br>a:sdd/rasd&it;"
			function stripscript(s){ 
		//var pattern = new RegExp("[%--`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？]")        //格式 RegExp("[在中间定义特殊过滤字符]")
		var pattern = new RegExp("[%--`~!@#$^&*()=|{}':;',\\[\\]<>/?~！@#￥……&*|{}']")
		var rs = ""; 
		for (var i = 0; i < s.length; i++) { 
			rs = rs+s.substr(i, 1).replace(pattern, ''); 
		}
			return rs;
		}
		var txt = document.querySelector("#userSign");
		txt.addEventListener("click",function(){
			var y = JSON.stringify(this.value)
			var sy = stripscript(y)
			y = sy.replace(/\\n/g,"<br>")
			document.querySelector(".div").innerHTML=y;

		})


	
		
	</script>
</body>
</html>